<template>
  <div v-if="load" v-loading="loading">
    <div class="form-body">
      <step :step="2"></step>
      <el-divider content-position="center">确认投保信息</el-divider>
      <div class="form-window">
        <div class="form-window-line"></div>
        <div class="form-window-txt">保障方案</div>
      </div>
      <div class="form-form">

        <el-form label-position="left" label-width="140px" size="small">
          <el-form-item label="保障方案"><span v-if="showTestFeatures && info.bx_id == 15">充电桩功率({{ info.level }}) </span>
            +
              <span v-if="showTestFeatures && info.bx_id == 15">责任限额({{
                info.fanan_memo }})</span> 
                +
                <span>财产保额({{ info.property_type }})元</span>
              </el-form-item>
        </el-form>
        <!-- <el-form label-position="left" label-width="140px" size="small" >
          <el-form-item label="财产保额">{{ info.fanan_memo }}（{{info.level}}） </el-form-item>
        </el-form> -->
        <el-card shadow="never" class="fanan-card" v-if="info.bx_id != 10 && info.bx_id != 15">
          <div class="fanan-card-item">
            <div class="fanan-card-item-left">方案</div>
            <div class="fanan-card-item-right">
              {{ info.fanan_memo }}
              <span v-if="info.level">({{ info.level }})</span>
            </div>
          </div>
          <div class="fanan-card-item" v-if="info.bx_id == 9 && info.fanan">
            <div class="fanan-card-item-left">保费</div>
            <div class="fanan-card-item-right" v-html="info.fanan"></div>
          </div>
          <!-- <div class="fanan-card-item" v-if="info.bx_id == 9">
            <div class="fanan-card-item-left">事故死亡</div>
            <div class="fanan-card-item-right" v-html="info.insure_info.fanan[info.fanan].sw_limit"></div>
          </div> -->

          <div class="fanan-card-item" v-if="info.bx_id == 9 && info.ylfy && info.bx_id != 15">
            <div class="fanan-card-item-left">医疗费用</div>
            <div class="fanan-card-item-right" v-html="info.ylfy"></div>
          </div>
          <!-- <div class="fanan-card-item" v-if="info.bx_id !== 9">
            <div class="fanan-card-item-left">死亡/伤残</div>
            <div class="fanan-card-item-right" v-html="info.insure_info.fanan[info.fanan].swsc"></div>
          </div> -->
          <div class="fanan-card-item" v-if="info.bx_id !== 9 && info.ylfy && info.bx_id != 15">
            <div class="fanan-card-item-left">医疗费用</div>
            <div class="fanan-card-item-right">
              {{ info.ylfy }}
            </div>
          </div>
          <div class="fanan-card-item" v-if="info.bx_id !== 9 && info.flfy && info.bx_id != 15">
            <div class="fanan-card-item-left">法律费用</div>
            <div class="fanan-card-item-right">{{ info.flfy }}</div>
          </div>
          <div class="fanan-card-item" v-if="info.bx_id !== 9 && (info.zyjt || info.wgf) && info.bx_id != 15">
            <div class="fanan-card-item-left">
              {{ info.bx_id == 6 ? "住院津贴" : "误工费用" }}
            </div>
            <div class="fanan-card-item-right">
              {{ info.bx_id == 6 ? info.zyjt : info.wgf }}
            </div>
          </div>
        </el-card>
      </div>
      <div class="form-window" v-if="info.bx_id != 10">
        <div class="form-window-line"></div>
        <div class="form-window-txt">投保企业</div>
      </div>
      <div class="form-form" v-if="info.bx_id != 10">
        <!-- 单位 -->
        <div v-if="info.insure.type == 1">
          <el-form label-position="left" label-width="140px" size="small">
            <el-form-item label="企业名称">{{ info.insure.name }}</el-form-item>
            <el-form-item label="统一信用编码">{{ info.insure.client }}</el-form-item>
            <el-form-item label="经办人">{{ info.insure.contact }}</el-form-item>
            <el-form-item label="手机号码" v-if="info.insure.contact_mobile">{{ info.insure.contact_mobile }}</el-form-item>
            <el-form-item label="所属地区" v-if="info.insure.province">{{ info.insure.province }}{{ info.insure.city }}{{
              info.insure.area
            }}{{ info.insure.address }}</el-form-item>
            <el-form-item label="营业执照">
              <el-image @click="seeImage(info.insure.license)" :src="info.insure.license" fit="cover"
                class="form-license-img"></el-image>
            </el-form-item>
          </el-form>
        </div>
        <!-- 个人 -->
        <div v-if="info.insure.type == 2">
          <el-form label-position="left" label-width="140px" size="small">
            <el-form-item label="投保人">{{ info.insure.name }}</el-form-item>
            <el-form-item label="证件类型">身份证</el-form-item>
            <el-form-item label="证件号码">{{ info.insure.client }}</el-form-item>
            <el-form-item label="手机号码">{{ info.insure.contact_mobile }}</el-form-item>
          </el-form>
        </div>
      </div>
      <div class="form-window" v-if="info.bx_id == 11">
        <div class="form-window-line"></div>
        <div class="form-window-txt">被保企业</div>
      </div>
      <div class="form-form" v-if="info.bx_id == 11">
        <el-form label-position="left" label-width="140px" size="small">
          <el-form-item label="企业名称">{{ info.merchant.name }}</el-form-item>
          <el-form-item label="统一信用编码">{{ info.merchant.client }}</el-form-item>
        </el-form>
      </div>
      <div class="form-window" v-if="info.bx_id == 11">
        <div class="form-window-line"></div>
        <div class="form-window-txt">营业场所信息</div>
      </div>
      <div class="form-form" v-if="info.bx_id == 11">
        <el-form label-position="left" label-width="140px" size="small">
          <el-form-item label="营业场所邮编">{{ info.premises.no }}</el-form-item>
          <el-form-item label="营业场所省市区">{{ info.premises.province }}{{ info.premises.city
          }}{{ info.premises.area }}</el-form-item>
          <el-form-item label="详细地址">{{ info.premises.address }}</el-form-item>
          <el-form-item label="营业场所面积(㎡)">{{
            info.premises.area_num
          }}</el-form-item>
          <el-form-item label="营业场所结构">{{ info.premises.structure }}</el-form-item>
          <el-form-item label="营业性质">{{ info.premises.nature }}</el-form-item>
        </el-form>
      </div>
      <div class="form-window" v-if="info.bx_id == 10">
        <div class="form-window-line"></div>
        <div class="form-window-txt">投保人信息</div>
      </div>
      <div class="form-form" v-if="info.bx_id == 10">
        <el-form label-position="left" label-width="140px" size="small">
          <el-form-item label="投保人">
            {{ info.insure.name }}
          </el-form-item>
          <el-form-item label="法人" v-if="info.insure.contact">
            {{ info.insure.contact }}
          </el-form-item>
          <el-form-item label="证件类型">
            {{ info.insure.type == 1 ? "统一信用代码" : "身份证" }}
          </el-form-item>
          <el-form-item label="证件号码">
            {{ info.insure.client }}
          </el-form-item>
          <el-form-item label="手机号码">
            {{ info.insure.contact_mobile }}
          </el-form-item>
          <el-form-item label="所属省市区">
            {{ info.insure.province + "-" + info.insure.city + "-" + info.insure.area }}
          </el-form-item>
          <el-form-item label="详细地址">
            {{ info.insure.address }}
          </el-form-item>
          <!-- <el-form-item label="邮箱">
            {{ info.insure.email }}
          </el-form-item> -->
        </el-form>
      </div>
      <div class="form-window" v-if="info.bx_id == 10">
        <div class="form-window-line"></div>
        <div class="form-window-txt">被保人信息</div>
      </div>
      <div class="form-form" v-if="info.bx_id == 10">
        <el-form label-position="left" label-width="140px" size="small">
          <el-form-item label="被保人">
            {{ info.insured.name }}
          </el-form-item>

          <el-form-item label="证件类型">
            {{ info.insured.type == 1 ? "统一信用代码" : "身份证" }}
          </el-form-item>
          <el-form-item label="证件号码">
            {{ info.insured.card_no }}
          </el-form-item>
          <el-form-item label="手机号码">
            {{ info.insured.contact_mobile }}
          </el-form-item>
          <el-form-item label="所属省市区">
            {{
              info.insured.province + "-" + info.insured.city + "-" + info.insured.area
            }}
          </el-form-item>
          <el-form-item label="详细地址">
            {{ info.insured.address }}
          </el-form-item>
          <!-- <el-form-item label="邮箱">
            {{ info.insured.email }}
          </el-form-item> -->
        </el-form>
      </div>
      <div class="form-window" v-if="info.bx_id == 10">
        <div class="form-window-line"></div>
        <div class="form-window-txt">运输信息</div>
      </div>
      <div class="form-form" v-if="info.bx_id == 10">
        <el-form label-position="left" label-width="140px" size="small">
          <el-form-item label="车牌号">
            {{ info.transport.voyage_no }}
          </el-form-item>
          <el-form-item label="型号">
            {{ info.transport.vehicle_name }}
          </el-form-item>
          <el-form-item label="起运时间">
            {{ info.transport.shipment_date }}
          </el-form-item>
          <el-form-item label="起运地所属省市区">
            {{
              info.transport.departure_province +
              "-" +
              info.transport.departure_city +
              "-" +
              info.transport.departure_area
            }}
          </el-form-item>
          <el-form-item label="起运地详细地址">
            {{ info.transport.departure_station }}
          </el-form-item>
          <el-form-item label="目的地所属省市区">
            {{
              info.transport.terminal_province +
              "-" +
              info.transport.terminal_city +
              "-" +
              info.transport.terminal_area
            }}
          </el-form-item>

          <el-form-item label="目的地详细地址">
            {{ info.transport.terminal_station }}
          </el-form-item>
          <el-form-item label="吨位数">
            {{ info.transport.toncount }}
          </el-form-item>
        </el-form>
      </div>
      <div class="form-window" v-if="info.bx_id == 10">
        <div class="form-window-line"></div>
        <div class="form-window-txt">货物信息</div>
      </div>
      <div class="form-form" v-if="info.bx_id == 10">
        <el-form label-position="left" label-width="140px" size="small">
          <div v-for="(item, index) in info.goods" :key="index">
            <el-form-item label="货位名称">
              {{ item.name }}
            </el-form-item>
            <el-form-item label="装载方式">
              {{ item.way }}
            </el-form-item>
          </div>
        </el-form>
      </div>
      <div v-if="info.open_arr.length > 0">
        <div class="form-window">
          <div class="form-window-line"></div>
          <div class="form-window-txt">被保企业</div>
        </div>
        <div class="form-form">
          <el-card v-for="(item, key) in info.open_arr" :key="'open' + key" shadow="never" :style="{
            marginTop: key == 0 ? '0' : '10px',
            position: 'relative',
          }">
            <el-form label-position="left" label-width="140px" size="small">
              <el-form-item label="企业名称">{{ item.name }}</el-form-item>
              <el-form-item label="统一信用编码">{{ item.client }}</el-form-item>
            </el-form>
          </el-card>
        </div>
        <!--<div class="form-form">
          <el-form label-position="left" label-width="140px" size="small">
            <el-form-item label="企业名称" >{{info.open_name}}</el-form-item>
            <el-form-item label="统一信用编码" >{{info.open_no}}</el-form-item>
            <el-form-item label="所在地区" ></el-form-item>

          </el-form>
        </div>-->
      </div>
      <div class="form-window" v-if="info.bx_id != 10">
        <div class="form-window-line"></div>
        <div class="form-window-txt">保单生效日期</div>
      </div>
      <div class="form-form" v-if="info.bx_id != 10">
        <el-form label-position="left" label-width="140px" size="small">
          <el-row :gutter="20">
            <el-col :span="12">
              <el-form-item label="录入日期">{{ info.create_time }}</el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="生效日期">{{ info.start_time }}</el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="失效日期">{{ info.end_time }}</el-form-item>
            </el-col>
          </el-row>
        </el-form>
      </div>
      <div class="form-window" v-if="info.bx_id == 12 ? info.protected.length > 0 : info.user.length > 0">
        <div class="form-window-line"></div>
        <div class="form-window-txt">投保人员</div>
      </div>
      <div class="form-form" v-if="info.bx_id == 12 ? info.protected.length > 0 : info.user.length > 0">
        <el-table size="small" border :data="info.bx_id == 12 ? info.protected : info.user">
          <el-table-column label="序号" type="index" width="60px"></el-table-column>
          <el-table-column :label="'姓名' + (info.bx_id == 12 ? '/单位名称' : '')" prop="name"></el-table-column>
          <el-table-column :label="'身份证号' + (info.bx_id == 12 ? '/统一信用代码' : '')" prop="id_card"></el-table-column>
          <el-table-column v-if="info.bx_id == 12" label="手机号" prop="contact_mobile"></el-table-column>
          <el-table-column label="保费" width="100px" prop="price">
            <!--<span>{{info.price}}元</span>-->
          </el-table-column>
        </el-table>
      </div>
      <div class="form-window" v-if="info.bx_id == 12">
        <div class="form-window-line"></div>
        <div class="form-window-txt">标的要素</div>
      </div>
      <div class="form-form" v-if="info.bx_id == 12">
        <el-form label-position="left" label-width="140px" size="small">
          <el-form-item label="房屋结构">{{ info.riskinfo.structure_name }}</el-form-item>
          <el-form-item label="标的地址">{{ info.riskinfo.province }}{{ info.riskinfo.city }}{{ info.riskinfo.area
          }}{{ info.riskinfo.address }}</el-form-item>
        </el-form>
      </div>
      <!-- <div class="form-window" v-if="info.stake" v-show="info.stake.length > 0">
        <div class="form-window-line"></div>
        <div class="form-window-txt">投保充电桩清单</div>
      </div> -->
      <!-- <div class="form-form" v-if="info.stake" v-show="info.stake.length > 0">
        <el-table size="small" border :data="info.stake">
          <el-table-column label="序号" type="index" width="60px"></el-table-column>
          <el-table-column label="编号" prop="no"></el-table-column>
          <el-table-column label="价值" prop="price"></el-table-column>
          <span>{{info.price}}元</span>
        </el-table>
      </div>
      <div class="form-window" v-if="info.stake" v-show="info.stake.length > 0">
        <div class="form-window-line"></div>
        <div class="form-window-txt">充电站信息</div>
      </div>
      <div class="form-form" v-if="info.charge_info">
        <div style="display: flex; margin-top: 30px">
          <div style="width: 100px">充电站地址</div>
          <div
            class="ml-[100px]"
            style="margin-left: 100px"
            v-if="info.charge_info.province"
          >
            {{ info.charge_info.province }}-{{ info.charge_info.city }}-{{
              info.charge_info.area
            }}
          </div>
        </div>
        <div style="display: flex; margin-top: 30px">
          <div style="width: 100px">详细地址</div>
          <div class="ml-[100px]" style="margin-left: 100px">
            {{ info.charge_info.address }}
          </div>
        </div>
        <div style="display: flex; margin-top: 30px">
          <div style="width: 100px">充电桩数量</div>
          <div class="ml-[100px]" style="margin-left: 100px">
            {{ info.charge_info.num }}
          </div>
        </div>
        <div style="display: flex; margin-top: 30px">
          <div style="width: 100px">充电站面积</div>
          <div class="ml-[100px]" style="margin-left: 100px">
            {{ info.charge_info.area_num }}
          </div>
        </div>
      </div> -->

      <div class="form-window">
        <div class="form-window-line"></div>
        <div class="form-window-txt">发票信息</div>
      </div>
      <div class="form-form">
        <el-form label-position="left" label-width="140px" size="small">
          <el-form-item label="发票类型">{{
            info.invoice.invoice_type == 1 ? "增值税专票" : "增值税普票"
          }}</el-form-item>
          <el-form-item label="发票抬头">{{ info.invoice.invoice_name }} </el-form-item>
          <el-form-item label="纳税人编号">{{ info.invoice.invoice_no }}</el-form-item>

          <div v-if="info.invoice.invoice_type == 1">
            <el-form-item label="注册地址" v-if="info.invoice.invoice_province">{{ info.invoice.invoice_province }}{{
              info.invoice.invoice_city
            }}{{ info.invoice.invoice_area
              }}{{ info.invoice.invoice_address }}</el-form-item>
            <el-form-item label="注册电话">{{
              info.invoice.invoice_mobile
            }}</el-form-item>
            <el-form-item label="开户银行">{{ info.invoice.invoice_bank }}</el-form-item>
            <el-form-item label="开户账户">{{
              info.invoice.invoice_bank_no
            }}</el-form-item>
            <el-form-item label="收件人" v-if="info.type == 2">{{
              info.invoice.name
            }}</el-form-item>
            <el-form-item label="收件人手机号" v-if="info.type == 2">{{
              info.invoice.mobile
            }}</el-form-item>
            <el-form-item label="收件地址" v-if="info.type == 2">{{ info.invoice.province }}{{ info.invoice.city }}{{
              info.invoice.area
            }}{{ info.invoice.address }}</el-form-item>
          </div>
        </el-form>
      </div>
      <!--      <div class="zfts-box">-->
      <!--        支付提示：支付后系统认领需要数分钟，届时您可以点击<span class="wyzf-text" @click="getpayState()">我已支付</span>查询更新订单状态-->
      <!--      </div>-->
      <div v-if="info.type == 2">
        1、请下载投保单，仔细阅读并告知被保险人；<br />
        2、打印投保单前5页，第3页投保人处盖章，同时加盖骑缝章。清晰拍照或者扫描前5页后，在系统提交进入付款页面；<br />
        3、如需公对公支付，请在<span style="font-weight: bold; color: red">附言栏或用途栏</span>填写付款页面的通知单号后六位！<br />
        账号如下：<br />
        户名：中国平安财产保险股份有限公司苏州分公司，<br />
        账号：1102020209000489684， 银行名称：中国工商银行苏州道前支行
        行号：102305002029<br />
      </div>
      <div class="confirm-total-price">保费合计：{{ info.total_price }}元</div>
      <div class="confirm-btn">
        <el-button size="small" class="com-btn" @click="updateOrder()">修改</el-button>
        <el-button size="small" class="com-btn" @click="pay(info.type)">前往支付</el-button>
        <el-button size="small" class="com-btn" @click="pay(info.type)"
          v-if="info.type == 1 && (info.bx_id != 15 && showTestFeatures)">
          线下对公支付</el-button>
      </div>
      <div class="wxts-box" v-if="(showTestFeatures && info.bx_id != 15) && info.type == 1">
        <span>温馨提示：</span>
        <p>
          线下公对公支付，请务必确认正确填写账户信息以及<span>备注支付号</span>，谢谢！有疑问请及时联系<span>在线客服</span>并提供<span>汇款凭证</span>。由于各银行实际到账时间有区别<span>（0-24小时不等）</span>，系统将在收到款后生成保单，请耐心等待系统收款完成出单。
        </p>
      </div>
      <div class="confirm-btn" v-if="info.type == 2"
        style="display: flex; justify-content: center; align-items: center">
        <el-button size="small" class="com-btn" @click="updateOrder()" style="margin: 0 10px">修改</el-button>
        <el-button size="small" class="com-btn" @click="paPay()" v-if="!info.apply_no"
          style="margin: 0 10px">下一步</el-button>
        <el-button size="small" class="com-btn" @click="getApply()" v-if="info.apply_no && !info.apply_url"
          style="margin: 0 10px">获取投保单</el-button>
        <a :href="info.apply_url" download target="_blank"><el-button size="small" class="com-btn" v-if="info.apply_url"
            style="margin: 0 10px">下载投保单</el-button></a>
        <el-button size="small" class="com-btn" v-if="info.apply_url" style="margin: 0 10px"
          @click="uploadFile">上传投保单</el-button>
        <el-button size="small" class="com-btn" @click="goToPay()" v-if="info.pay_url"
          style="margin: 0 10px">去支付</el-button>
        <div style="color: red; margin-left: 20px; cursor: pointer" @click="shili(1)">
          盖章示例
        </div>
        <!-- <div style="color: red; margin-left: 20px; cursor: pointer" @click="shili(2)">
          盖骑缝章示例
        </div> -->
      </div>
    </div>
    <el-dialog :visible.sync="img_model" title="查看大图" width="500px" :append-to-body="true">
      <img :src="img_src" style="display: block; width: 100%" />
    </el-dialog>
    <el-dialog :visible.sync="shili_dialog" title="查看实例" width="500px" :append-to-body="true">
      <!-- <el-image style="width: 500px" :src="shiliImage" fit="cover"></el-image> -->
      <img v-if="shiliImage == 1" src="@/assets/img/shili1.jpg" style="width: 450px" object-fit="cover" />
      <img v-if="shiliImage == 2" src="@/assets/img/shili2.jpg" style="width: 450px" object-fit="cover" />
    </el-dialog>
    <el-dialog title="上传盖章投保单" :visible.sync="uploadDialog" width="500px" :append-to-body="true">
      <el-upload :on-success="upSuccess" class="upload-demo" drag action="/seller/order/uploadApply" multiple
        :data="{ id: this.info.id, apply_no: this.info.apply_no }">
        <i class="el-icon-upload"></i>
        <div class="el-upload__text">将文件拖到此处，或<em>点击上传</em></div>
        <div class="el-upload__tip" slot="tip">只能上传图片或pdf文件</div>
      </el-upload>
    </el-dialog>
    <!-- 支付弹窗 -->
    <el-dialog :visible.sync="dialogPay" show-close width="1240px" @closed="dialogPayClosed"
      :close-on-click-modal="false">
      <div>
        <iframe style="width: 1200px; height: 680px" :src="pay_url"></iframe>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import step from "../../components/step/step.vue";

export default {
  components: { step },
  data() {
    return {
      dialogPay: false,
      id: 0,
      info: {},
      load: false,
      img_model: false,
      uploadDialog: false,
      img_src: "",
      loading: false,
      shiliImage: "",
      shili_dialog: false,
      pay_url: "",
    };
  },
  mounted() {
    this.id = this.$route.params.id;
    this.getData();
  },
  methods: {
    upSuccess(e) {
      if (e.code) {
        this.getData();
        this.uploadDialog = false;
      }
      this.toast(e.code, e.msg);
    },
    uploadFile() {
      this.uploadDialog = true;
    },
    getpayState() {
      this.ajaxs("order/getpayState", {
        data: {
          id: this.id,
        },
        success: (res) => {
          this.toast(res.code, res.msg);
          if (res.code) {
            this.$router.push({
              path: "/index/order/list",
            });
          }
        },
      });
    },
    seeImage(src) {
      this.img_model = true;
      this.img_src = src;
    },
    pay(type) {
      let url = "";
      //区分光伏和其他 光伏2  其他1
      // if (this.info.type == 2) {
      //   url = "paorder/orderPay";
      // } else {
      //   url = "order/orderPay";
      // }
      url = "order/orderPay";
      this.loading = true;
      this.ajaxs(url, {
        data: {
          id: this.id,
          type: type,
        },
        success: (res) => {
          this.loading = false;
          if (res.code) {
            this.pay_url = res.msg;
            this.dialogPay = true;
          } else {
            this.toast(res.code, res.msg);
          }
        },
      });
    },
    //支付弹窗关闭时的回调
    dialogPayClosed() {
      this.messagePay();
    },
    //确认是否支付提示
    messagePay() {
      this.$confirm("是否已支付?", "提示", {
        confirmButtonText: "支付成功",
        cancelButtonText: "未支付",
        type: "warning",
      })
        .then(() => {
          this.$router.replace({
            path: "/index/order/list",
          });
          // this.ajaxs("home/truePay", {
          //   data: {
          //     id: this.id,
          //   },
          //   success: (res) => {
          //     if (res.code) {
          //       this.$router.push({
          //         path: "/index/order/list",
          //       });
          //     } else {
          //       this.toast(res.code, res.msg);
          //     }
          //   },
          // });
        })
        .catch(() => { });
    },
    goToPay() {
      this.pay_url = this.info.pay_url;
      this.dialogPay = true;
      // window.open(
      //   this.info.pay_url,
      //   "_blank",
      //   "height=700,width=1200,top=50,left=400,toolbar=no,menubar=no, scrollbars=no,resizable=no,location=no, status=no"
      // );
      // this.$confirm("是否已支付?", "提示", {
      //   confirmButtonText: "支付成功",
      //   cancelButtonText: "未支付",
      //   type: "warning",
      // })
      //   .then(() => {
      //     this.$router.push({
      //             path: "/index/order/list",
      //           });

      //   })
      //   .catch(() => { });
    },
    updateOrder() {
      this.$router.replace({
        path: "/index/index/form/" + this.info.bx_id,
        query: {
          order_id: this.info.id,
        },
      });
      // if (this.info.type == 1) {
      //   this.$router.push({
      //     path: "/index/index/form/" + this.info.bx_id,
      //     query: {
      //       order_id: this.info.id,
      //     },
      //   });
      // } else {
      //   this.$router.push({
      //     path: "/index/index/formGF/" + this.info.bx_id,
      //     query: {
      //       order_id: this.info.id,
      //     },
      //   });
      // }
    },
    getData() {
      this.ajaxs("order/orderDetail", {
        data: {
          id: this.id,
        },
        success: (res) => {
          this.info = res.msg;
          this.load = true;
        },
      });
    },
    paPay() {
      let url = "order/orderPay";
      this.loading = true;
      this.ajaxs(url, {
        data: {
          id: this.id,
          type: 1,
        },
        success: (res) => {
          this.loading = false;
          if (res.code) {
            this.toast(res.code, "提交成功");
            this.getData();
          } else {
            this.toast(res.code, res.msg);
          }
        },
      });
    },
    getApply() {
      this.loading = true;
      this.ajaxs("order/getApplyBd", {
        data: { id: this.id },
        success: (res) => {
          this.loading = false;
          if (res.code) {
            this.toast(res.code, "获取成功");
            this.getData();
          } else {
            this.toast(res.code, res.msg);
          }
        },
      });
    },
    shili(v) {
      //1是盖章实例 2是盖骑缝章实例
      this.shiliImage = v;
      this.shili_dialog = true;
    },
  },
};
</script>

<style scoped>
@import "../../assets/css/index/form.css";

.zfts-box {
  margin-bottom: 20px;
  line-height: 25px;
  color: red;
}

.wyzf-text {
  color: #1446eb;
  cursor: pointer;
}

.wxts-box {
  line-height: 25px;
  margin-top: 15px;
}

.wxts-box span {
  color: red;
}

.wxts-box>p {
  text-indent: 2em;
}

.pay {
  background-color: #dddddd;
}
</style>
